package com.william.jdbcplus.test.entity;

import com.william.jdbcplus.common.annotation.TableColumn;
import com.william.jdbcplus.common.annotation.TableId;
import com.william.jdbcplus.common.annotation.Table;
import com.william.jdbcplus.common.entity.Entity;
import com.william.jdbcplus.common.enums.IdType;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@Table("db_menu")
@ApiModel("部门表")
public class DbMenu implements Entity {
    @TableId(value = "id", remarks = "主键", type = IdType.ATOMIC)
    private String id;

    @TableColumn(remarks = "上级菜单Id", size = 50)
    private String parentId;

    @TableColumn(value = "name", remarks = "菜单名", nullable = false)
    private String name;

    @TableColumn(value = "menu_level", remarks = "菜单级别，一级，二级", size = 10)
    private String menuLevel;

    @TableColumn(value = "perms", remarks = "菜单权限编码，例如：“sys:schedule:list,sys:schedule:info”,多个逗号隔开")
    private String perms;

    @TableColumn(value = "perms_type", remarks = "权限策略  1显示 2禁用")
    private String permsType;

    @TableColumn(value = "icon", remarks = "菜单图标")
    private String icon;

    @TableColumn(value = "component", remarks = "前端组件", size = 200)
    private String component;

    @TableColumn(value = "component_name", remarks = "组件名字")
    private String componentName;

    @TableColumn(value = "url", remarks = "路径", size = 200)
    private String url;

    @TableColumn(value = "redirect", remarks = "一级菜单跳转地址")
    private String redirect;

    @TableColumn(value = "sort_no", remarks = "菜单排序")
    private Double sortNo;

    @TableColumn(value = "menu_type", remarks = "类型  0：导航菜单；1：子菜单 ；2：按钮")
    private Integer menuType;

    @TableColumn(value = "is_leaf", remarks = "是否叶子节点 1:是  0:不是")
    private Boolean leaf;

    @TableColumn(value = "is_route", remarks = "是否路由菜单: 0:不是  1:是（默认值1）")
    private Boolean route;

    @TableColumn(value = "keep_alive", remarks = "是否缓存页面: 0:不是  1:是（默认值1）")
    private Boolean keepAlive;

    @TableColumn(value = "description", remarks = "描述", size = 4000)
    private String description;

    @TableColumn(value = "hidden", remarks = "是否隐藏")
    private Boolean hidden;

    @TableColumn(value = "status", remarks = "按钮权限状态 (0无效1有效)")
    private String status;

    @TableColumn(value = "always_show", remarks = "聚合路由")
    private Boolean alwaysShow;

    @TableColumn(value = "internal_or_external", remarks = "外链菜单打开方式  0:内部打开 1:外部打开")
    private Boolean internalOrExternal;
}
